//
//  YHYAddView.m
//  Home
//
//  Created by 杨泓晔 on 16/4/19.
//  Copyright © 2016年 LanJue. All rights reserved.
//

#import "YHYAddView.h"
#import "YHYAddWorkViewController.h"
@interface YHYAddView ()
@property (nonatomic,retain)UIButton *addBtu;
@property (nonatomic,retain)UIView *myView;

@end

@implementation YHYAddView
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubView];
    }
    return self;
}

- (void)createSubView {

    self.myView = [UIView new];
    [self addSubview:self.myView];
    [self.myView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.width.height.mas_equalTo(self);
        make.left.mas_equalTo(self);
        
    }];
    self.myView.backgroundColor = LV;
    
    self.addBtu = [UIButton new];
    [self.addBtu setTitle:@"+ 添加工作经历" forState:UIControlStateNormal];
    self.addBtu.titleLabel.font = [UIFont systemFontOfSize:TEXTCONTENTFONT* AUTO_WIDTH];
    [self.myView addSubview:self.addBtu];
    [self.addBtu setTitleColor:GH forState:UIControlStateNormal];
    self.addBtu.backgroundColor = [UIColor whiteColor];
    [self.addBtu mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self);
        make.height.mas_equalTo(50 * AUTO_HEIGHT);
        make.left.mas_equalTo(self);
        make.width.mas_equalTo(self);
    }];
    [self.addBtu addTarget:self action:@selector(butAction:) forControlEvents:    UIControlEventTouchUpInside];
    
}

- (void)butAction:(UIButton *)btu{
    [self.delegate present];
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
